<?php
define("DEPLOYED",false);
require "global.php";
require "taobao.php";

include_once FANWE_ROOT.'sdks/taobao/TopClient.php';
include_once FANWE_ROOT.'sdks/taobao/request/ItemsSearchRequest.php';
include_once FANWE_ROOT.'sdks/taobao/request/TaobaokeItemsConvertRequest.php';

$c = new TopClient;
$c->appkey = APPKEY;
$c->secretKey = SECRET;

$goods_url = "http://item.taobao.com/item.htm?id=16371591981";
$gid = getID($goods_url);
$item_req = new TaobaokeItemsDetailGetRequest;
$item_req->setFields("click_url");
$item_req->setPid(10135627);
$item_req->setNumIids($gid);
$item_resp = (array)$c->execute($item_req);
print_r($item_resp);
?>